package com.xayy.health.mgt.model;

import cn.kawins.mybatis.base.BaseModel;
import cn.kawins.spring.mvc.validator.Group;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import tk.mybatis.mapper.annotation.KeySql;
import tk.mybatis.mapper.code.IdentityDialect;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @author zhangxa
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "HEALTH.model_algorithm_info")
public class ModelAlgorithmInfo extends BaseModel<Integer> {

    @Id
    @Column(name = "id")
    @KeySql(dialect = IdentityDialect.MYSQL)
    @NotNull(groups = Group.Update.class, message = "主键不能为空")
    @ApiModelProperty(value = "主键", accessMode = ApiModelProperty.AccessMode.READ_ONLY)
    private Integer id;

    @Column(name = "model_id")
    @ApiModelProperty(value = "模型id")
    private String modelId;

    @Column(name = "algorithm_name")
    @NotEmpty(message = "算法名称不能为空")
    @ApiModelProperty(value = "算法名称")
    private String algorithmName;

    @Column(name = "param_name")
    @ApiModelProperty(value = "算法参数名称")
    private String paramName;

    @Column(name = "param_name_cn")
    @ApiModelProperty(value = "算法参数中文名称")
    private String paramNameCn;

    @Column(name = "param_type")
    @ApiModelProperty(value = "参数类型")
    private Integer paramType;

    @Column(name = "param_value_start")
    @ApiModelProperty(value = "建议值")
    private String paramValueStart;

    @Column(name = "param_value_end")
    @ApiModelProperty(value = "默认值")
    private String paramValueEnd;

    @Column(name = "select_info")
    @ApiModelProperty(value = "下拉框内容")
    private String selectInfo;

    @Override
    public Integer idValue() {
        return null;
    }
}